<?php
/**
 * @name property_item.php
 * @copyright (c) 2011
 * @author Amissah Gideon <kuulmek@yahoo.com>
 */
class PropertyItem extends AppModel {
	var $name = 'PropertyItem';

/**
 * hasOne associations
 *
 * @var array
 */
	public $hasOne = array(
		'PropertyItemDetail' => array(
			'className' => 'PropertyItemDetail',
			'foreignKey' => 'property_item_id',
			'conditions' => '',
			'fields' => '',
			'order' => ''
		)
	);

/**
 * belongsTo associations
 *
 * @var array
 */
	public $belongsTo = array(
		'PropertyGroup' => array(
			'className' => 'PropertyGroup',
			'foreignKey' => 'property_group_id',
			'conditions' => '',
			'fields' => '',
			'order' => ''
		),
		'Location' => array(
			'className' => 'Location',
			'foreignKey' => 'location_id',
			'conditions' => '',
			'fields' => '',
			'order' => ''
		),
		'PropertyGroupType' => array(
			'className' => 'PropertyGroupType',
			'foreignKey' => 'property_group_type_id',
			'conditions' => '',
			'fields' => '',
			'order' => ''
		),
		'PropertyGroupSubType' => array(
			'className' => 'PropertyGroupSubType',
			'foreignKey' => 'property_group_sub_type_id',
			'conditions' => '',
			'fields' => '',
			'order' => ''
		)
	);

/**
 * hasMany associations
 *
 * @var array
 */
	public $hasMany = array(
		'BillPayment' => array(
			'className' => 'BillPayment',
			'foreignKey' => 'property_item_id',
			'dependent' => false,
			'conditions' => '',
			'fields' => '',
			'order' => '',
			'limit' => '',
			'offset' => '',
			'exclusive' => '',
			'finderQuery' => '',
			'counterQuery' => ''
		),
		'BillProperty' => array(
			'className' => 'BillProperty',
			'foreignKey' => 'property_item_id',
			'dependent' => false,
			'conditions' => '',
			'fields' => '',
			'order' => '',
			'limit' => '',
			'offset' => '',
			'exclusive' => '',
			'finderQuery' => '',
			'counterQuery' => ''
		)
	);


/**		# Validation rules.
    var $validate = array(
        'username' => array(
            'notNull' =>array(
    		   'rule' => 'notEmpty',
    		   'required' => true,
    		   'message' => 'The Login Name must not be null and it is required',
    		   'last' => true
    		),
    	    'alphanumeric' => array(
    		   'rule' => 'alphaNumeric',
    		   'required' => true,
    		   'message' => 'Login must be alphanumeric.',
    		   'last' => true
    		)
		),
        'first_name' => array(
            'notNull' =>array(
    		   'rule' => 'notEmpty',
    		   'required' => true,
    		   'message' => 'The Fisrt Name must not be null and it is required',
    		   'last' => true
    		),
    	    'alphanumeric' => array(
    		   'rule' => 'alphaNumeric',
    		   'required' => true,
    		   'message' => 'Fisrt Name must be alphanumeric.',
    		   'last' => true
    		)
		),
        'last_name' => array(
            'notNull' =>array(
    		   'rule' => 'notEmpty',
    		   'required' => true,
    		   'message' => 'The Last Name must not be null and it is required',
    		   'last' => true
    		),
    	    'alphanumeric' => array(
    		   'rule' => 'alphaNumeric',
    		   'required' => true,
    		   'message' => 'Last Name must be alphanumeric.',
    		   'last' => true
    		)
		),
	    'password' => array(
	       'rule' => 'notEmpty',
	       'required' => true,
	       'message' => 'The Password must not be null and it is required'
	    )
	); */


}
?>
